﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Shop.Home.Repositories;
using Shop.Page.Models;

namespace Shop.Page.Services
{
    
    public class PageAccess
    {

        Repositories.PageAccess dal = new Repositories.PageAccess();
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="wpinfo"></param>
        /// <returns></returns>
        public object AddWares(WaresPicture wpinfo)
        {
            return dal.AddWares(wpinfo);
        }
        /// <summary>
        /// 获取信息
        /// </summary>
        /// <returns></returns>
        public IList<WaresPicture> GetWPInfo()
        {
            return dal.GetWPInfo();
        }
        /// <summary>
        /// 根据ID获取信息
        /// </summary>
        /// <param name="HID"></param>
        /// <returns></returns>
        public WaresPicture GetWPInfoByHID(int HID)
        {
            return dal.GetWPInfoByHID(HID);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="wpinfo"></param>
        /// <returns></returns>
        public int UpdatePage(WaresPicture wpinfo)
        {
            return dal.UpdatePage(wpinfo);
        }
        /// <summary>
        /// 置顶
        /// </summary>
        /// <param name="HID"></param>
        /// <returns></returns>
        public int OrderPage(int HID)
        {
            return dal.OrderPage(HID);
        } 
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="HID"></param>
        /// <returns></returns>
        public int DelPage(int HID)
        {
            return dal.DelPage(HID);
        }

    }
}
